Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/upgrade_protobuf_version #365

Merged
merged 4 commits into from
Dec 13, 2024
Merged

Conversation

aarmoa
Copy link
Collaborator

@aarmoa aarmoa commented Dec 12, 2024

  • Change dependency version to make it more flexible

Summary by CodeRabbit

  • New Features

    • Updated version to 1.8.2, enhancing project functionality.
    • Added new dependency importlib-metadata for improved compatibility.
  • Bug Fixes

    • Improved flexibility in dependency management for protobuf.
    • Updated version constraint for aiohttp to allow for more compatible versions.
  • Chores

    • Updated gRPC plugin version in configuration files.
    • Specified Python version range for GitHub Actions pre-commit workflow.

Copy link
Contributor

coderabbitai bot commented Dec 12, 2024

Walkthrough

The changes in this pull request include updates to the CHANGELOG.md, buf.gen.yaml, and pyproject.toml files. The changelog now reflects a new version entry [1.8.2], noting updates to the protobuf dependency. The buf.gen.yaml file has updated the gRPC plugin version from v1.65.4 to v1.65.5, while the pyproject.toml file shows an increment in the project version to 1.8.2 and modifications to the version constraints for aiohttp and protobuf.

Changes

File Change Summary
CHANGELOG.md Added version entry [1.8.2] dated 2024-12-13; updated protobuf dependency version flexibility.
buf.gen.yaml Updated gRPC plugin version from v1.65.4 to v1.65.5; no other changes in inputs or structure.
pyproject.toml Incremented version from 1.8.1 to 1.8.2; changed aiohttp constraint to ^3.9.4; modified protobuf constraint to ^5.26.1; added importlib-metadata dependency.

Possibly related PRs

  • (fix) Update OFAC list URL and filename #362: This PR updates the OFAC list URL and filename, which is directly related to the changes in the pyproject.toml file regarding the protobuf dependency, as both involve updates to compliance and dependency management.
  • Feat/sync dev with v1.8.1 #363: This PR includes updates to the changelog for version 1.8.1, which reflects changes in the OFAC list, aligning with the updates made in the main PR regarding dependency management and versioning.

Suggested reviewers

  • PavelInjective

🐇 In the changelog, a new version's born,
With dependencies flexed, and updates adorned.
From v1.65.4 to v1.65.5,
Our code hops forward, keeping dreams alive.
With aiohttp and protobuf in sight,
We leap into the future, oh what a delight! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Experiment)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 62da05d and 6e566d5.

⛔ Files ignored due to path filters (1)
  • poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • CHANGELOG.md (1 hunks)
  • buf.gen.yaml (1 hunks)
  • pyproject.toml (3 hunks)
✅ Files skipped from review due to trivial changes (2)
  • buf.gen.yaml
  • CHANGELOG.md
🔇 Additional comments (2)
pyproject.toml (2)

3-3: LGTM: Version bump follows semantic versioning

The version increment to 1.8.2 is appropriate for dependency constraint updates.


25-25: LGTM: Improved version constraint for aiohttp

The change from >= to ^ provides better version control by allowing patches and minor updates while preventing potentially breaking major version changes. This is particularly important given the security context mentioned in the comment.

pyproject.toml Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c96b6d5 and bdf4a11.

📒 Files selected for processing (1)
  • .github/workflows/pre-commit.yml (1 hunks)
🔇 Additional comments (1)
.github/workflows/pre-commit.yml (1)

15-16: Verify Python version compatibility with dependencies

Let's verify if the Python version constraints align with the project's dependencies, particularly the upgraded protobuf version.

✅ Verification successful

Python version constraints are compatible with dependencies

The specified Python version range >=3.9 <3.12 in the workflow file is compatible with:

  • Project's Python requirement (^3.9) in pyproject.toml
  • Protobuf package requirement (>=3.8)
  • All dependency constraints in poetry.lock and Pipfile.lock (minimum versions range from 3.5 to 3.8)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check Python version requirements in pyproject.toml and potential conflicts

# Check Python version specification in pyproject.toml
echo "Checking Python version constraints in pyproject.toml:"
rg "python\s*=" pyproject.toml

# Check protobuf package requirements
echo -e "\nChecking protobuf package Python requirements:"
curl -s https://pypi.org/pypi/protobuf/json | jq -r '.info.requires_python'

# Look for any explicit Python version requirements in the codebase
echo -e "\nChecking for other Python version constraints in the codebase:"
rg "python_requires|python_version|requires-python" .

Length of output: 5280

Comment on lines +15 to +16
with:
python-version: '>=3.9 <3.12'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Incorrect Python version constraint syntax for GitHub Actions

The version constraint syntax '>=3.9 <3.12' is not compatible with GitHub Actions' setup-python action. The action expects either a specific version number or a simpler version specification.

Apply this change to fix the syntax:

  with:
-    python-version: '>=3.9 <3.12'
+    python-version: '3.9'

Alternatively, if you need to test against multiple Python versions, consider using a matrix strategy:

jobs:
  pre-commit:
    runs-on: ubuntu-latest
+   strategy:
+     matrix:
+       python-version: ['3.9', '3.10', '3.11']
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
-         python-version: '>=3.9 <3.12'
+         python-version: ${{ matrix.python-version }}

Committable suggestion skipped: line range outside the PR's diff.

@PavelInjective PavelInjective merged commit 1e411e4 into master Dec 13, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants